package org.project.areader.activity;

import java.util.Timer;
import java.util.TimerTask;

import org.project.areader.util.Global;

import android.content.Intent;
import android.os.Bundle;

/**
 * 
 * @author robin
 * @date 2011-3-21
 * 
 */
public class CoverActivity extends BaseActivity
{

	@Override
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.cover);
		Global.init(this);
	}

	@Override
	protected void onStart()
	{
		super.onStart();

		Intent intent = getIntent();
		if (250 != intent.getFlags())
		{
			Timer t = new Timer();
			t.schedule(new TimerTask()
			{
				@Override
				public void run()
				{

					startActivity(new Intent(CoverActivity.this, StartActivity.class));
					finish();
				}
			}, 2000);
		}
		else
		{
			Timer t = new Timer();
			t.schedule(new TimerTask()
			{
				@Override
				public void run()
				{					
					finish();
				}
			}, 2000);
		}

	}
}